home *** CD-ROM | disk | FTP | other *** search
/ Internet Tools (InfoMagic) / Internet Tools.iso / samba / BROWSING.txt < prev    next >
Text File  |  1995-04-24  |  4KB  |  119 lines

  1. BROWSING
  2. ========
  3.  
  4. Samba has recently begun support for browsing. The browsing is
  5. supported by nmbd and is also controlled by options in the smb.conf
  6. file (see smb.conf(5)).
  7.  
  8. Samba does not act as a browse master for a workgroup, so it can only
  9. participate in workgroups which already have a browse master. If you
  10. have any WfWg or WinNT machines in your workgroup that exports a share
  11. then you already have a browse master so this shouldn't be a problem.
  12.  
  13. To get browsing to work you need to run nmbd as usual, but need to
  14. either give the -G option to elect which workgroup Samba will be part
  15. of, or use a lmhosts file.
  16.  
  17. The -G option is most useful for simple setups where Samba is browsable
  18. in only one workgroup. In more complex cases the lmhosts file is
  19. better.
  20.  
  21. Be very careful setting up your lmhosts file. An incorrectly setup
  22. lmhosts file can have disasterous results for your net!
  23.  
  24. A simple lmhosts file might be:
  25.  
  26. # This is a simple lmhosts file
  27. #
  28. # This is a host alias. Anyone querying this name
  29. # will get the specified IP
  30. 192.0.2.17 SMBDATA
  31. #
  32. # first put ourselves in workgroup MYGROUP using
  33. # our own net address
  34. 0.0.0.0 MYGROUP G
  35.  
  36. Samba has a useful option for a Samba server to offer itself for
  37. browsing on another subnet.
  38.  
  39. This works by the lmhosts file specifying a broadcast address on the
  40. other network to use to find a browse master for the workgroup.
  41.  
  42. For example if you wanted yourself to appear in the workgroup STAFF on
  43. the network which has a broadcast of 192.0.3.255 then this entry would
  44. do the trick:
  45.  
  46. # put ourselves in the STAFF workgroup on the other subnet
  47. 192.0.3.255 STAFF S
  48.  
  49. Notice the S at the end! It is very important you include this as this
  50. entry without the S could cause a broadcast storm!
  51.  
  52. If browsing is causing you trouble you can disable it with the -b
  53. option to nmbd.
  54.  
  55. If something doesn't work then hopefully the log.nmb.debug file will
  56. help you track down the problem.
  57.  
  58. Note that if it doesn't work for you, then you should still be able to
  59. type the server name as \\SERVER in filemanager then hit enter and
  60. filemanager should display the list of available shares.
  61.  
  62. Remember: Samba can only participate in EXISTING workgroups. If you specify
  63. a workgroup that dosn't exist then browsing won't work. In future versions
  64. Samba will probably be able to create it's own workgroups.
  65.  
  66. Some people find browsing fails because they don't have the global
  67. "guest account" set to a valid account. Remember that the IPC$
  68. connection that lists the shares is done as guest, and thus you must
  69. have a valid guest account.
  70.  
  71. Also, a lot of people are getting bitten by the problem of too many
  72. parameters on the command line of nmbd in inetd.conf. This trick is to
  73. not use spaces between the option and the parameter (eg: -d2 instead
  74. of -d 2), and to not use the -B and -N options. New versions of nmbd
  75. are now far more likely to correctly find your broadcast and network
  76. addess, so in most cases these aren't needed.
  77.  
  78.  
  79. FINDING A MASTER BROWSER
  80. ========================
  81.  
  82. Often people find that nmbd has trouble finding a master browser. The
  83. likely causes of this problem are:
  84.  
  85. 1) you are using the wrong broadcast address
  86.  
  87. 2) You are using the wrong workgroup name
  88.  
  89. 3) You don't have a master browser.
  90.  
  91. To find out which of the above problems applies to you use the -M
  92. switch to nmbd to search for a master browser manually. eg:
  93.  
  94. nmbd -M FOOGROUP -B a.b.c.d
  95.  
  96. This will look for a master browser for the workgroup FOOGROUP using
  97. broadcast a.b.c.d. When you successfully find a master browser you
  98. know you have the broadcast and group name right.
  99.  
  100.  
  101. NOTE ABOUT BROADCAST ADDRESSES
  102. ==============================
  103.  
  104. If your network uses a "0" based broadcast address (for example if it
  105. ends in a 0) then you may strike problems. Windows for Workgroups does
  106. not seem to support a 0's broadcast and you will probably find that
  107. browsing and name lookups won't work.
  108.  
  109. You have a few options:
  110.  
  111. 1) change to a 1's broadcast on your unix server. These often end in
  112. .255 (check with your local network guru for details)
  113.  
  114. 2) set the nmbd broadcast to a 1's based address on the command line using
  115. the -B option.
  116.  
  117. 3) explicitly support both broadcasts with two entries in your lmhosts file.
  118.  
  119.